Skip to content

Fixes for PUMAS bfb with QPC7 and FHISTC_LTso CAM snapshot - #1

Merged
cacraigucar merged 1 commit into
nusbaume:pumas_round3from
jimmielin:pumas_round3
Jun 18, 2026
Merged

Fixes for PUMAS bfb with QPC7 and FHISTC_LTso CAM snapshot#1
cacraigucar merged 1 commit into
nusbaume:pumas_round3from
jimmielin:pumas_round3

Conversation

@jimmielin

Copy link
Copy Markdown

I brought in two items from my house-of-cards:

  • a hetfrz_classnuc_stub stub - this is so I can set do_hetfrz_classnuc in namelist to true for a FHISTC_LTso snapshot.
  • the clamp_number_concentrations was updated to remove graupel

Assisted-by: claude-opus:4.8[1m]
@jimmielin

Copy link
Copy Markdown
Author

My CAM/src/physics/cam7/physpkg.F90 for taking the snapshot.
This mod may not be bfb with existing CAM, because the snapshot taking requires separating out microp_aero's tendencies with microp_driver_tend and could introduce roundoff.

https://github.com/jimmielin/CAM/blob/hplin/physpkg_microp_pumas_snapshot/src/physics/cam7/physpkg.F90

My CAM-SIMA/src/data/registry.xml
Mostly adapted from Cheryl's version on Izumi, but I removed hetfrz flag (so it can be made into a snapshot) and fixed the num* standard names to fit the CCPP spreadsheet

https://github.com/jimmielin/CAM-SIMA/blob/hplin/temp_pumas/src/data/registry.xml

My CAM-SIMA code
/glade/derecho/scratch/hplin/260617_pumas_debug/CAM-SIMA.dev

Comment on lines +219 to +222
! PUMAS uses total stratiform fraction for both liquid and ice stratus.
! Mirrors CAM micro_pumas_cam.F90: alst_mic => ast; aist_mic => ast.
pumas_strat_liq_cldfrc(:ncol,:) = real(strat_cldfrc_in(:,:), pumas_r8)
pumas_strat_ice_cldfrc(:ncol,:) = real(strat_cldfrc_in(:,:), pumas_r8)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding this one. That was a tricky one!

pumas_naai(:,:) = 0._pumas_r8
pumas_npccn(:,:) = 0._pumas_r8
pumas_qsatfac(:,:) = 0._pumas_r8
pumas_frzimm(:ncol,:) = real(frzimm_in(:,:), pumas_r8)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you get rid of these variables being set to zero? I seem to remember needing to do that a while back for a reason.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAAI, NPCCN, and QSATFAC are required inputs passed in from microp_aero into PUMAS.

The first two don't matter for QPC7 but matter for FHISTC_LTso. They're NaNs in QPC7 but that appears to be fine.

QSATFAC's default value is 1, not 0, so if set to 0 here it will certainly introduce answer differences. See micro_pumas_cam.F90 in cam7:

   ! The null value for qsatfac is 1, not zero
   qsatfac(:ncol,:top_lev-1) = 1._r8

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I get to the diagnostic's step, will the NAAI and NPCCN need to have values if they are written out. I wish I could remember why I needed to add these.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they are inputs to PUMAS so there's no diagnostic output for NAAI and NPCCN. I don't think microp_aero writes them out either, but I can add that in my PR.

Before I lose this in the terminal scrollback, here's the dropsonde output without the fix: it can be seen that SIMA has all these set to zeroes but CAM has values being read in from the snapshot:

  [INPUTS DIFFER] micro_pumas_ccpp [step 1] (hit 0) arg pumas_qsatfac: 28188/28188 elements differ, max |diff| 1.000e+00 at (1,1): sima=0 cam=1
  [INPUTS DIFFER] micro_pumas_ccpp [step 1] (hit 0) arg pumas_naai: 812/28188 elements differ, max |diff| 1.031e+02 at (289,29): sima=0 cam=103.07385026541536
  [INPUTS DIFFER] micro_pumas_ccpp [step 1] (hit 0) arg pumas_npccn: 28188/28188 elements differ, max |diff| 3.610e+04 at (208,36): sima=0 cam=-36099.379900846732

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly, this was the section which impacted the numbers the most.

@cacraigucar
cacraigucar merged commit 2b7ecfa into nusbaume:pumas_round3 Jun 18, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants